<!DOCTYPE html>
<meta charset="utf-8">
<link rel="shortcut icon" href="favicon.ico">
<link href="/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="/css/font-awesome.css?v=4.4.0" rel="stylesheet">
<link href="/css/animate.css" rel="stylesheet">
<link href="/css/layui.css" rel="stylesheet">
<link href="/css/style.css?v=4.1.0" rel="stylesheet">
<link rel="stylesheet" href="/css/gg-bootdo.css" />
<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="signupForm">
                        <input id="id" name="id" th:value="${material.id}"  type="hidden">
                        <input id="oldImgId" name="oldImgId" th:value="${material.imgId}"  type="hidden">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">物资图片：</label>
                            <div class="layui-upload-drag" id="cloud-upload" style="margin-left: 15px;padding: 15px">
                                <i class="fa fa-cloud-upload fa-4x" aria-hidden="true" style="color:#009689;"></i>
                                <p>点击上传，或将文件拖拽到此处</p>
                                <div class="layui-hide" id="uploadDemoView" th:class="${material.imgUrl == null}?layui-hide">
                                    <hr>
                                    <img src="" th:src="${material.imgUrl}" alt="上传成功后渲染" style="max-width: 196px">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><em class="gg-star">*</em>物资名称：</label>
                            <div class="col-sm-8">
                                <input id="name" name="name" th:value="${material.name}" class="form-control" type="text" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><em class="gg-star">*</em>数量：</label>
                            <div class="col-sm-8">
                                <input id="number" name="number" th:value="${material.number}" class="form-control" number="text" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label"><em class="gg-star">*</em>物资分类：</label>
                            <div class="col-sm-8">
                                <input id="kindId" name="kindId" class="hidden" th:value="${material.kindId}">
                                <input id="kindName" name="kindName"
                                       class="form-control" type="text" style="cursor: pointer;"
                                       onclick="openKind()" readonly="readonly" placeholder="所属部门" th:value="${material.kindName}" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-8 col-sm-offset-3">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script src="/js/layui.js"></script>
<script type="text/javascript" src="/js/appjs/cms/material/edit.js"></script>
</body>
</html>
